package com.navi.core.service.impl;

import com.navi.core.service.ICIMService;
import com.navi.core.util.JacksonUtil;
import com.navi.mould1.tx.BaseTxIn;
import com.navi.mould1.tx.BaseTxOut;

/**
 * Created by admin on 2017/6/28.
 */
public abstract class ICIMDefaultServiceImpl<I extends BaseTxIn, O extends BaseTxOut> implements ICIMService {
    @Override
    public String subMainProc(String strInObj) {

        BaseTxIn object = new BaseTxIn();
        I inTrx = (I) object;
        JacksonUtil.fromJson(strInObj, inTrx.getClass());

        O outTrx = subMainProc2(inTrx);
        return JacksonUtil.toJSONStr(outTrx);
    }

    public abstract O subMainProc2(I i);

}
